/*
*   给组件调用的接口API
*
*  */
import http from "./http";

//使用表单上传，需要加上 "Content-Type": "multipart/form-data"
export const uploadImage = (params) => {
    return http.request({
        url: "/api/common/upload",
        method: "post",
        data: params,
        headers: {
            Authorization: localStorage.getItem('token'),
            "Content-Type": "multipart/form-data"
        }
    });
}

export const detectImage = (params) => {
    return http.request({
        url: "/api/detect",
        method: "get",
        params,
        headers: {
            Authorization: localStorage.getItem('token'),
        }
    });
}